<template>
  <view class="feedback_box">
    <view class="list">
      <view class="item" @click="toComplaints">
        <image
          class="img"
          src="../../static/images/complaint_feedback/consultation.svg"
          mode="scaleToFill"
        />
        <view class="text">投诉</view>
      </view>
      <view class="item" @click="toSuggestion">
        <image
          class="img"
          src="../../static/images/complaint_feedback/feedback.svg"
          mode="scaleToFill"
        />
        <view class="text">反馈</view>
      </view>
    </view>
  </view>
</template>

<!-- 投诉反馈页面 -->
<script lang="ts" setup>
import { ComplaintFeedbackTypeEnum } from '@/config/enum/enum';


//跳转建议页面
const toSuggestion = () => {
  uni.navigateTo({ url: `/subpkg/feedback/edit?category=${ComplaintFeedbackTypeEnum.CANCEL}` })
}

//跳转投诉页面
const toComplaints = () => {
  uni.navigateTo({ url: `/subpkg/feedback/edit?category=${ComplaintFeedbackTypeEnum.SUBMIT}` })
}
</script>

<style scoped lang="scss">
.feedback_box {
  padding: 0 30rpx;
  width: calc(100% - 60rpx);

  .list {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .item {
      position: relative;
      flex: 1;
      display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: space-between;

      .img {
        width: 300rpx;
        height: 300rpx;
      }

      .text {
        position: absolute;
        bottom: -10rpx;
        left: 50%;
        font-weight: 700;
        transform: translateX(-50%);
        color: rgb(99, 90, 90);
      }
    }
  }
}
</style>
